package com.mall.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mall.dubbo.mapper.PmsMemberPriceMapper;
import com.mall.model.domain.PmsMemberPrice;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author xyiaao
 * @description 针对表【pms_member_price(商品会员价格表)】的数据库操作Api实现
 * @createDate 2022-03-29 19:46:09
 */
@DubboService
public class PmsMemberPriceApiImpl extends ServiceImpl<PmsMemberPriceMapper, PmsMemberPrice>
        implements PmsMemberPriceApi {

    @Autowired
    private PmsMemberPriceMapper memberPriceMapper;

    @Override
    public List<PmsMemberPrice> findByProductId(Integer id) {

        LambdaQueryWrapper<PmsMemberPrice> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(PmsMemberPrice::getProductId, id);
        List<PmsMemberPrice> pmsMemberPrices = memberPriceMapper.selectList(queryWrapper);
        return pmsMemberPrices;
    }

}




